#NEXUS

[see the "garli.conf.AA.LGmodel" configuration file for an example of how to use this model]

[ Le, S.Q., and Gascuel, O. 2008. An improved general amino acid replacement matrix.
Mol Biol Evol 25: 1307-1320. ]


[this entire GALRI block can be copied into your NEXUS datafile to use the LG model.  Also set ratematrix = fixed and statefrequencies = fixed in the configuration file.  If you want to use the observed AA frequencies, remove the frequecy part of the block and set statefrequencies = empirical]
begin garli;

[this is the LG model rate matrix, in GARLI format (upper triangle, alphabetical by single letter codes)]
[it is scaled such that the mean rate is 100, but GARLI does not require any particular scaling]

r 243.500 38.656 101.598 24.819 202.114 35.106 14.657 52.486 38.675 109.961 27.080 115.206 94.882 41.586 462.446 209.301 249.250 17.679 21.420 6.120 0.342 108.123 55.689 62.662 31.366 1.298 58.110 87.426 51.728 7.374 8.297 52.294 272.397 111.863 191.672 65.557 114.020 512.992 1.704 82.657 90.697 1.046 27.681 1.475 2.499 496.584 38.588 51.201 12.126 121.332 41.661 3.714 2.924 13.217 1.840 34.127 41.467 4.330 176.791 6.816 16.996 52.994 41.030 403.888 35.606 59.867 59.141 23.971 7.616 11.743 8.764 66.732 108.855 2.340 253.635 175.976 8.758 9.241 3.508 5.158 35.396 16.142 64.046 240.373 763.432 30.472 0.852 29.019 4.330 13.651 140.640 19.268 26.214 38.171 170.218 12.701 7.503 26.266 5.349 10.652 68.211 35.836 43.286 441.125 49.779 470.891 237.387 96.850 57.157 11.643 58.408 519.152 15.561 405.499 418.074 18.734 7.658 7.127 12.423 6.271 101.128 1041.770 10.923 22.747 13.451 64.234 209.847 38.184 316.401 618.860 73.241 111.216 18.118 4.882 12.907 617.519 6.694 24.365 56.980 29.529 17.833 29.635 166.574 60.617 29.314 36.294 9.768 163.622 47.361 33.942 197.646 185.746 68.105 47.085 15.827 165.890 73.554 392.126 195.720 8.187 4.439 59.873 61.073 32.531 130.905 55.905 29.006 9.306 8.767 274.689 119.723 105.666 20.576 23.107 25.174 83.950 56.641 16.717 58.071 30.761 633.164 9.623 24.345 39.184 214.061 13.776 24.050 18.539 24.390 308.333 ;

[these are the LG model amino acid frequencies, in GARLI order]
e  0.079066  0.012937  0.053052  0.071586  0.042302  0.057337  0.022355  0.062157  0.0646  0.099081  0.022951  0.041977  0.04404  0.040767  0.055941  0.061197  0.053287  0.069147  0.012066  0.034155
;
end;

[
MATRICES AND OTHER PROGRAMS
Unfortunately, I beleive that GARLI, PAML, and MrBayes all have different orderings of the amino acids.  PAML
is alphabetical by three-letter code, MrBayes is alphabetical by full name (same as PAML, but swap Gln and Glu), GARLI
is alphabetical by single letter code.  Additionally, I believe that PAML takes the below diagonal matrix as input,
while GARLI and MrBayes take the upper.
Below is PAML's LG matrix, taken directly from PAML's distribution.
Below that is my transformation of the matrix to what I think is correct for MrBayes.
]

[
From PAML:
(Equilibrium amino-acid frequencies and exchangeability matrix in PAML format).

0.425093 
0.276818 0.751878 
0.395144 0.123954 5.076149 
2.489084 0.534551 0.528768 0.062556 
0.969894 2.807908 1.695752 0.523386 0.084808 
1.038545 0.363970 0.541712 5.243870 0.003499 4.128591 
2.066040 0.390192 1.437645 0.844926 0.569265 0.267959 0.348847 
0.358858 2.426601 4.509238 0.927114 0.640543 4.813505 0.423881 0.311484 
0.149830 0.126991 0.191503 0.010690 0.320627 0.072854 0.044265 0.008705 0.108882 
0.395337 0.301848 0.068427 0.015076 0.594007 0.582457 0.069673 0.044261 0.366317 4.145067 
0.536518 6.326067 2.145078 0.282959 0.013266 3.234294 1.807177 0.296636 0.697264 0.159069 0.137500 
1.124035 0.484133 0.371004 0.025548 0.893680 1.672569 0.173735 0.139538 0.442472 4.273607 6.312358 0.656604 
0.253701 0.052722 0.089525 0.017416 1.105251 0.035855 0.018811 0.089586 0.682139 1.112727 2.592692 0.023918 1.798853 
1.177651 0.332533 0.161787 0.394456 0.075382 0.624294 0.419409 0.196961 0.508851 0.078281 0.249060 0.390322 0.099849 0.094464 
4.727182 0.858151 4.008358 1.240275 2.784478 1.223828 0.611973 1.739990 0.990012 0.064105 0.182287 0.748683 0.346960 0.361819 1.338132 
2.139501 0.578987 2.000679 0.425860 1.143480 1.080136 0.604545 0.129836 0.584262 1.033739 0.302936 1.136863 2.020366 0.165001 0.571468 6.472279 
0.180717 0.593607 0.045376 0.029890 0.670128 0.236199 0.077852 0.268491 0.597054 0.111660 0.619632 0.049906 0.696175 2.457121 0.095131 0.248862 0.140825 
0.218959 0.314440 0.612025 0.135107 1.165532 0.257336 0.120037 0.054679 5.306834 0.232523 0.299648 0.131932 0.481306 7.803902 0.089613 0.400547 0.245841 3.151815 
2.547870 0.170887 0.083688 0.037967 1.959291 0.210332 0.245034 0.076701 0.119013 10.649107 1.702745 0.185202 1.898718 0.654683 0.296501 0.098369 2.188158 0.189510 0.249313 

0.079066 0.055941 0.041977 0.053052 0.012937 0.040767 0.071586 0.057337 0.022355 0.062157 0.099081 0.064600 0.022951 0.042302 0.044040 0.061197 0.053287 0.012066 0.034155 0.069147 

 A   R   N   D   C   Q   E   G   H   I   L   K   M   F   P   S   T   W   Y   V
Ala Arg Asn Asp Cys Gln Glu Gly His Ile Leu Lys Met Phe Pro Ser Thr Trp Tyr Val
]

[
This is, I THINK, the MrBayes input order for the LG matrix (above diagonal, ordered alphabetically by full amino acid name.
It is scaled such that the mean rate is 100, but relative rate matrices can in general be rescaled by any constant factor without changing the meaning. 
If you are using this as a Direchlet prior then the scaling DOES MATTER. 
If you are going to use this as MrBayes input YOU are responsible for understanding the implications of what you are doing 
(setting a prior) and for double checking that the ordering is correct.

	41.586	27.080	38.656	243.500	101.598	94.882	202.114	35.106	14.657	38.675	52.486	109.961	24.819	115.206	462.446	209.301	17.679	21.420	249.250	
		73.554	12.126	52.294	35.606	274.689	38.171	237.387	12.423	29.529	618.860	47.361	5.158	32.531	83.950	56.641	58.071	30.761	16.717	
			496.584	51.728	52.994	165.890	140.640	441.125	18.734	6.694	209.847	36.294	8.758	15.827	392.126	195.720	4.439	59.873	8.187	
				6.120	512.992	51.201	82.657	90.697	1.046	1.475	27.681	2.499	1.704	38.588	121.332	41.661	2.924	13.217	3.714	
					0.342	8.297	55.689	62.662	31.366	58.110	1.298	87.426	108.123	7.374	272.397	111.863	65.557	114.020	191.672	
						403.888	34.127	41.467	4.330	6.816	176.791	16.996	1.840	41.030	59.867	59.141	7.616	11.743	23.971	
							26.214	470.891	7.127	56.980	316.401	163.622	3.508	61.073	119.723	105.666	23.107	25.174	20.576	
								30.472	0.852	4.330	29.019	13.651	8.764	19.268	170.218	12.701	26.266	5.349	7.503	
									10.652	35.836	68.211	43.286	66.732	49.779	96.850	57.157	58.408	519.152	11.643	
										405.499	15.561	418.074	108.855	7.658	6.271	101.128	10.923	22.747	1041.770	
											13.451	617.519	253.635	24.365	17.833	29.635	60.617	29.314	166.574	
												64.234	2.340	38.184	73.241	111.216	4.882	12.907	18.118	
													175.976	9.768	33.942	197.646	68.105	47.085	185.746	
														9.241	35.396	16.142	240.373	763.432	64.046	
															130.905	55.905	9.306	8.767	29.006	
																633.164	24.345	39.184	9.623	
																	13.776	24.050	214.061	
																		308.333	18.539	
																			24.390	


The amino acid frequencies, in MrBayes order:
0.079066	0.055941	0.041977	0.053052	0.012937	0.071586	0.040767	0.057337	0.022355	0.062157	0.099081	0.0646	0.022951	0.042302	0.04404	0.061197	0.053287	0.012066	0.034155	0.069147	
]
